function compilePage(self)
{   
    self.Page = Class.create(Container,
    {
        /**
         * Constructor.
         * 
         * @param parentContainer A parent container, if required. Position and size will be calculated relative to the parent.
         * @param range The range of coordinates specifying the size of the page container.
         * @param hidden Whether or not the page is initially hidden.
         * @param containerDivId The page container area.
         * @param headDivId The page head area.
         * @param bodyDivId The page body area.
         * @param closeDivId The close page area.
         * @param onCloseCallback Any function to call on close.
         */
        initialize: function($super, parentContainer, range, hidden, containerDivId, headDivId, bodyDivId, closeDivId, onCloseCallback)
        {
        	// Invoke super class.
            $super(range, hidden, containerDivId, null, parentContainer);
            
            // Set properties.
            this.headDiv = jQuery('#' + headDivId);
            this.bodyDiv = jQuery('#' + bodyDivId);

            // Setup close handler.
            var closeDiv = jQuery('#' + closeDivId);
            closeDiv.click(
               function(self, onCloseCallback)
               {
                   return function()
                   {
                       self.hide();
                       if (onCloseCallback)
                       {
                            onCloseCallback();
                       }
                       return false;
                   };
               }(this, onCloseCallback));
            
            // Setup display.
            this.setDimensions(range);
        },
        
        /**
         * Sets the dimensions of the container.
         * 
         * @param range The range of coords.
         */
        setDimensions: function($super, range)
        {
            // Invoke overridden method.
            $super(range);
            
            // Setup inner containers.
            var headHeight = this.headDiv.height();
            if (!range.useMaxHeight)
            {
                this.bodyDiv.height(range.height() - headHeight);
            }
            else
            {
            	this.bodyDiv.css('max-height', range.height() - headHeight);
            }
        }
    });
}